package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author tianyonghong
 * @create 2023/9/14
 */
@Data
@Accessors(chain = true)
@TableName("zdd_company_apply")
public class CompanyApply extends Model<CompanyApply> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("企业id")
    private Integer compid;

    @ApiModelProperty("企业名称")
    @TableField(exist = false)
    private String compname;

    @ApiModelProperty("业务类型(1:智众包发票内容修改 2:智零工发票内容修改)")
    private Integer type;

    @ApiModelProperty("原有开票内容")
    private String oldInvoiceContent;

    @ApiModelProperty("申请内容")
    private String content;

    @ApiModelProperty("状态 1：待审核 2：已通过 3：已驳回")
    private Integer state;

    @ApiModelProperty("处理原因")
    private String handleReason;

    @ApiModelProperty("处理时间（同意或拒绝时间）")
    private Date handleTime;

    @ApiModelProperty("处理操作人员id")
    @TableField("handle_admin_id")
    private Integer handleAdminId;

    private Date createTime;

    @TableField(update = "now()")
    private Date updateTime;

    @ApiModelProperty("企业申请时的支付方式id")
    @TableField("curr_comp_pay_id")
    private Integer currCompPayId;

    @ApiModelProperty("企业申请时的支付方式")
    @TableField(exist = false)
    private String currCompPayName;

    @ApiModelProperty("企业申请时的主体id")
    @TableField("curr_comp_party_id")
    private Integer currCompPartyId;

    @ApiModelProperty("企业申请时的主体")
    @TableField(exist = false)
    private String currCompPartyName;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
